package com.example.tsproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 *
 * @TableName assignments
 */
@TableName(value ="assignments")
@Data
public class Assignments implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     *
     */
    @TableField(value = "publisher_number")
    private String publisher_number;

    /**
     *
     */
    @TableField(value = "stuNum")
    private String stuNum;

    /**
     *
     */
    @TableField(value = "class_number")
    private String class_number;

    /**
     *
     */
    @TableField(value = "start_time")
    private Date start_time;

    /**
     *
     */
    @TableField(value = "end_time")
    private Date end_time;

    /**
     *
     */
    @TableField(value = "name")
    private String name;

    /**
     *
     */
    @TableField(value = "assignment_type")
    private Object assignment_type;

    /**
     *
     */
    @TableField(value = "isUse")
    private Object isUse;

    /**
     *
     */
    @TableField(value = "isSubmit")
    private Object isSubmit;

    /**
     *
     */
    @TableField(value = "score")
    private BigDecimal score;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Assignments other = (Assignments) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getPublisher_number() == null ? other.getPublisher_number() == null : this.getPublisher_number().equals(other.getPublisher_number()))
                && (this.getStuNum() == null ? other.getStuNum() == null : this.getStuNum().equals(other.getStuNum()))
                && (this.getClass_number() == null ? other.getClass_number() == null : this.getClass_number().equals(other.getClass_number()))
                && (this.getStart_time() == null ? other.getStart_time() == null : this.getStart_time().equals(other.getStart_time()))
                && (this.getEnd_time() == null ? other.getEnd_time() == null : this.getEnd_time().equals(other.getEnd_time()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getAssignment_type() == null ? other.getAssignment_type() == null : this.getAssignment_type().equals(other.getAssignment_type()))
                && (this.getIsUse() == null ? other.getIsUse() == null : this.getIsUse().equals(other.getIsUse()))
                && (this.getIsSubmit() == null ? other.getIsSubmit() == null : this.getIsSubmit().equals(other.getIsSubmit()))
                && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPublisher_number() == null) ? 0 : getPublisher_number().hashCode());
        result = prime * result + ((getStuNum() == null) ? 0 : getStuNum().hashCode());
        result = prime * result + ((getClass_number() == null) ? 0 : getClass_number().hashCode());
        result = prime * result + ((getStart_time() == null) ? 0 : getStart_time().hashCode());
        result = prime * result + ((getEnd_time() == null) ? 0 : getEnd_time().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAssignment_type() == null) ? 0 : getAssignment_type().hashCode());
        result = prime * result + ((getIsUse() == null) ? 0 : getIsUse().hashCode());
        result = prime * result + ((getIsSubmit() == null) ? 0 : getIsSubmit().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", publisher_number=").append(publisher_number);
        sb.append(", stuNum=").append(stuNum);
        sb.append(", class_number=").append(class_number);
        sb.append(", start_time=").append(start_time);
        sb.append(", end_time=").append(end_time);
        sb.append(", name=").append(name);
        sb.append(", assignment_type=").append(assignment_type);
        sb.append(", isUse=").append(isUse);
        sb.append(", isSubmit=").append(isSubmit);
        sb.append(", score=").append(score);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
